package com.ck.web.shiro;

/**
 * 异常编码
 * Created by ChengK on 2017/1/9 0009.
 */
public enum LoginExceptionEnum {

    SYSTEM_EXCEPTION("SYSTEM_EXCEPTION","系统异常"),

    USERNAME_PASSWORD_IS_EMPTY("USERNAME_PASSWORD_IS_EMPTY","账号或密码为空"),
    LOGIN_PWD_ERROR("LOGIN_PWD_ERROR","登录密码错误"),
    LOGIN_ERROR_TOO_MANY("LOGIN_ERROR_TOO_MANY","登录次数过多"),
    ACCOUNT_NO_AUTHORIZATION("ACCOUNT_NO_AUTHORIZATION","账号未授权"),
    ACCOUNT_NOT_EXIST("ACCOUNT_NOT_EXIST","账号不存在"),
    ACCOUNT_WAS_EXPIRED("ACCOUNT_WAS_EXPIRED","账号已过期"),
    ACCOUNT_WAS_DISABLED("ACCOUNT_WAS_DISABLED","账号被禁用"),
    ACCOUNT_WAS_LOCKED("ACCOUNT_WAS_LOCKED","账号被锁定"),
    ALREADY_LOGIN_IN("ALREADY_LOGIN_IN","用户已登录"),
    UNKNOWN_ERROR("UNKNOWN_ERROR","未知异常");

    private String errCode;

    private String errMsg;

    LoginExceptionEnum(String errCode, String errMsg){
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public String getCode() {
        return this.errCode;
    }

    public String getDesc() {
        return this.errMsg;
    }
}
